package com.study.living.camera;

import android.content.Context;
import android.os.Build;
import android.view.Surface;

import com.study.living.mediacodec.SurfaceEncoder;

public class CameraProxy {

    private AbsCamera camera;

    public CameraProxy(Context context, AutoFitTextureView textureView) {
        if (Build.VERSION.SDK_INT >= 21) {
            TexturePreview texturePreview = new TexturePreview(textureView);
            camera = new Camera2(context, texturePreview);
        } else {

        }
    }

    public void start(){
        if (camera.isCameraOpened()){
            return;
        }
        camera.start();
    }

    public void stop(){
        camera.stop();
    }

    public void startEncoder(){
    }

}
